

import LayoutWithSidebar from '@/components/Layout/LayoutWithSidebar';
import LayoutWithoutSidebar from '@/components/Layout/LayoutWithoutSidebar';
import CommonView from '@/components/routerview';
// 考勤假期

// 考勤管理

// 每日考勤
const DailyDetail  = () => import('@/views/attendance/work/daily/index.vue');

// 月考勤表

const OverviewList = () => import('@/views/attendance/work/monthly/overview/list.vue');
const MonthlyDetailsList = () => import('@/views/attendance/work/monthly/details/list.vue');
const Monthly = () => import('@/views/attendance/work/monthly/index.vue');
const CheckInList = () => import('@/views/attendance/work/monthly/check-in/list.vue');
const ReplenishList = () => import('@/views/attendance/work/monthly/replenish/list.vue');

// 排班管理
const GroupList = () => import('@/views/attendance/work/schedule/group/list.vue');
const GroupAdd = () => import('@/views/attendance/work/schedule/group/add.vue');
const Guide = () => import('@/views/attendance/work/schedule/group/guide.vue');
// 打卡方式
const Mode = () => import('@/views/attendance/work/mode/index.vue');
const MachineList = () => import('@/views/attendance/work/mode/machine/list.vue');
const Mp = () => import('@/views/attendance/work/mode/mp/home.vue');
const MpImport = () => import('@/views/attendance/work/mode/mp/import.vue');


const attendance = {
    path: '/attendance',
    component: LayoutWithSidebar,
    redirect: "/attendance/work",
    meta: {
        name: "考勤假期"
    },
    children: [
        {
            path: 'work',
            component: CommonView,
            redirect: "/attendance/work/daily",
            meta: {
                name: "考勤管理"
            },
            children: [
                {
                    path: 'daily',
                    component: DailyDetail,
                    meta: {
                        name: "每日考勤"
                    },
                    children: [
                        {
                            path: 'detail',
                            component: DailyDetail,
                            meta: {
                                name: "考勤详情"
                            },
                        },
                    ]
                },
                {
                    path: 'monthly',
                    component: Monthly,
                    redirect: "/attendance/work/monthly/overview",
                    meta: {
                        name: "月考勤表"
                    },
                    children: [
                        {
                            path: 'overview',
                            component: CommonView,
                            redirect: "/attendance/work/monthly/overview/list",
                            meta: {
                                name: "概览"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: OverviewList,
                                    meta: {
                                        name: "月考勤汇总"
                                    },
                                },
                            ]
                        },
                        {
                            path: 'details',
                            component: CommonView,
                            redirect: "/attendance/work/monthly/details/list",
                            meta: {
                                name: "月考勤明细"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: MonthlyDetailsList,
                                    meta: {
                                        name: "月考勤明细-列表"
                                    },
                                },
                            ]
                        },
                        {
                            path: 'check-in',
                            component: CommonView,
                            redirect: "/attendance/work/monthly/check-in/list",
                            meta: {
                                name: "打卡记录"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: CheckInList,
                                    meta: {
                                        name: "打卡记录-列表"
                                    },
                                },
                            ]
                        },
                        {
                            path: 'replenish',
                            component: CommonView,
                            redirect: "/attendance/work/monthly/replenish/list",
                            meta: {
                                name: "补卡记录"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: ReplenishList,
                                    meta: {
                                        name: "补卡记录-列表"
                                    },
                                },
                            ]
                        },
                    ]
                },
                {
                    path: 'schedule',
                    component: CommonView,
                    redirect: "/attendance/work/schedule/group",
                    meta: {
                        name: "排班管理"
                    },
                    children: [
                        {
                            path: 'group',
                            component:CommonView,
                            redirect: "/attendance/work/schedule/group/list",
                            meta: {
                                name: "考勤组管理"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: GroupList,
                                    meta: {
                                        name: "考勤组管理-列表"
                                    },
                                },
                                {
                                    path: 'add',
                                    component: GroupAdd,
                                    meta: {
                                        name: "考勤组管理-新增"
                                    },
                                },
                                {
                                    path: 'guide',
                                    component: Guide,
                                    meta: {
                                        name: "考勤组管理-新增"
                                    },
                                },
                            ]
                        },
                    ]
                },
                {
                    path: 'mode',
                    component: Mode,
                    redirect: "/attendance/work/mode/machine",
                    meta: {
                        name: "打卡方式"
                    },
                    children: [
                        {
                            path: 'machine',
                            component: CommonView,
                            redirect: "/attendance/work/mode/machine/list",
                            meta: {
                                name: "打卡方式"
                            },
                            children: [
                                {
                                    path: 'list',
                                    component: MachineList,
                                    meta: {
                                        name: "打卡方式-列表"
                                    },
                                },
                                // {
                                //     path: 'add',
                                //     component: GroupAdd,
                                //     meta: {
                                //         name: "打卡方式-新增"
                                //     },
                                // },
                            ]
                        },
                        {
                            path: 'mp',
                            component: CommonView,
                            redirect: "/attendance/work/mode/mp/home",
                            meta: {
                                name: "打卡方式"
                            },
                            children: [
                                {
                                    path: 'home',
                                    component: Mp,
                                    meta: {
                                        name: "小程序打卡"
                                    },
                                },
                                {
                                    path: 'import',
                                    component: MpImport,
                                    meta: {
                                        name: "导入"
                                    },
                                },
                            ]
                        },
                    ]
                },

            ]
        },


    ],

}

export default attendance;